import {get,post,put,setTokens} from "../httpx";
import {MessageApi} from "../urls";

const getById = async (id) => {
  return await get(MessageApi.getById , {id} )
}

const read = async (id) => {
  return await put(MessageApi.readById+'?id='+id )
}

const getAll = async () => {
  return await get(MessageApi.getAll , {pageSize:30 , hasCount:false} )
}


const del = async (id) => {
  return await post(MessageApi.deleteById+'?id='+id , {} )
}

export const Message = {
  del,read,getAll,getById
}
